/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package base.mo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "matricula", catalog = "matriculas", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Matricula.findAll", query = "SELECT m FROM Matricula m"),
    @NamedQuery(name = "Matricula.findByIdMatricula", query = "SELECT m FROM Matricula m WHERE m.idMatricula = :idMatricula"),
    @NamedQuery(name = "Matricula.findByIdEstudiante", query = "SELECT m FROM Matricula m WHERE m.idEstudiante = :idEstudiante"),
    @NamedQuery(name = "Matricula.findByIdCurso", query = "SELECT m FROM Matricula m WHERE m.idCurso = :idCurso"),
    @NamedQuery(name = "Matricula.findByEspecialidad", query = "SELECT m FROM Matricula m WHERE m.especialidad = :especialidad"),
    @NamedQuery(name = "Matricula.findByAnio", query = "SELECT m FROM Matricula m WHERE m.anio = :anio"),
    @NamedQuery(name = "Matricula.findByCosto", query = "SELECT m FROM Matricula m WHERE m.costo = :costo")})
public class Matricula implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_MATRICULA", nullable = false)
    private Integer idMatricula;
    @Column(name = "ID_ESTUDIANTE")
    private Integer idEstudiante;
    @Column(name = "ID_CURSO")
    private Integer idCurso;
    @Size(max = 25)
    @Column(name = "ESPECIALIDAD", length = 25)
    private String especialidad;
    @Size(max = 15)
    @Column(name = "ANIO", length = 15)
    private String anio;
    @Size(max = 50)
    @Column(name = "COSTO", length = 50)
    private String costo;

    public Matricula() {
    }

    public Matricula(Integer idMatricula) {
        this.idMatricula = idMatricula;
    }

    public Integer getIdMatricula() {
        return idMatricula;
    }

    public void setIdMatricula(Integer idMatricula) {
        this.idMatricula = idMatricula;
    }

    public Integer getIdEstudiante() {
        return idEstudiante;
    }

    public void setIdEstudiante(Integer idEstudiante) {
        this.idEstudiante = idEstudiante;
    }

    public Integer getIdCurso() {
        return idCurso;
    }

    public void setIdCurso(Integer idCurso) {
        this.idCurso = idCurso;
    }

    public String getEspecialidad() {
        return especialidad;
    }

    public void setEspecialidad(String especialidad) {
        this.especialidad = especialidad;
    }

    public String getAnio() {
        return anio;
    }

    public void setAnio(String anio) {
        this.anio = anio;
    }

    public String getCosto() {
        return costo;
    }

    public void setCosto(String costo) {
        this.costo = costo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMatricula != null ? idMatricula.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Matricula)) {
            return false;
        }
        Matricula other = (Matricula) object;
        if ((this.idMatricula == null && other.idMatricula != null) || (this.idMatricula != null && !this.idMatricula.equals(other.idMatricula))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "base.mo.Matricula[ idMatricula=" + idMatricula + " ]";
    }
    
}
